package com.csg.service.impl;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.csg.service.GameService;

import com.csg.dao.GameMapper;

import com.csg.entity.Game;
import com.csg.entity.Pass;




@Service
@Transactional
public class GameServiceImpl implements GameService{
	//注入dao
		@Autowired
		private GameMapper gameMapper;

		@Override
		//实现所有胜平负列表
		public List<Game> selectAllGoals(){
			return this.gameMapper.selectAllGoals();
		}
		public List<Game> selectAllPalyBalls(){
			return this.gameMapper.selectAllPalyBalls();
		}
		public List<Game> selectAllScores(){
			return this.gameMapper.selectAllScores();
		}
		//查询id
		public Game selectPalyBalls(Integer id) {
			Game game =this.gameMapper.selectPalyBalls(id);
			return game;
		}
		//更新球
		public boolean updatePalyBall(Game game) {
			boolean result=this.gameMapper.updatePalyBall(game);
			return result;
		}
		//删除球
		public boolean deleteGoal(Integer id) {
			boolean result =this.gameMapper.deleteGoal(id);
			return result;
		}
		public boolean deletePalyBall(Integer id) {
			boolean result =this.gameMapper.deletePalyBall(id);
			return result;
		}
		public boolean deleteScore(Integer id) {
			boolean result =this.gameMapper.deleteScore(id);
			return result;
		}

		//添加球
		public boolean savePalyBall(Game game) {
			boolean result=this.gameMapper.savePalyBall(game);
			return result;
		}	
		
		
		
		//查询id
		public Game selectGoals(Integer id) {
			Game game =this.gameMapper.selectGoals(id);
			return game;
		}
		//更新球
		public boolean updateGoal(Game game) {
			boolean result=this.gameMapper.updateGoal(game);
			return result;
		}
	

		//添加球
		public boolean saveGoal(Game game) {
			boolean result=this.gameMapper.saveGoal(game);
			return result;
		}	
		
		public Game selectScores(Integer id) {
			Game game =this.gameMapper.selectScores(id);
			return game;
		}
		//更新球
		public boolean updateScore(Game game) {
			boolean result=this.gameMapper.updateScore(game);
			return result;
		}
		

		//添加球
		public boolean saveScore(Game game) {
			boolean result=this.gameMapper.saveScore(game);
			return result;
		}			

		@Override
		//实现所有胜平负列表
		public List<Game> selectAllDoubleResults(){
			return this.gameMapper.selectAllDoubleResults();
		}
		//查询id
		public Game selectDoubleResults(Integer id) {
			Game game =this.gameMapper.selectDoubleResults(id);
			return game;
		}
		//更新球
		public boolean updateDoubleResult(Game game) {
			boolean result=this.gameMapper.updateDoubleResult(game);
			return result;
		}
		//删除球
		public boolean deleteDoubleResult(Integer id) {
			boolean result =this.gameMapper.deleteDoubleResult(id);
			return result;
		}

		//添加球
		public boolean saveDoubleResult(Game game) {
			boolean result=this.gameMapper.saveDoubleResult(game);
			return result;
		}	
		
		
		public List<Game> selectAllPasss(){
			return this.gameMapper.selectAllPasss();
		}
		//查询id
		public Game selectPasss(Integer id) {
			Game game =this.gameMapper.selectPasss(id);
			return game;
		}
		//更新球
		public boolean updatePass(Game game) {
			boolean result=this.gameMapper.updatePass(game);
			return result;
		}
		//删除球
		public boolean deletePass(Integer id) {
			boolean result =this.gameMapper.deletePass(id);
			return result;
		}

		//添加球
		public boolean savePass(Game game) {
			boolean result=this.gameMapper.savePass(game);
			return result;
		}	
		
		
		
		
		public List<Game> selectAllGames(){
			return this.gameMapper.selectAllGames();
		}
		//查询id
		public Game selectGames(Integer id) {
			Game game =this.gameMapper.selectGames(id);
			return game;
		}
		public boolean saveGame(Game game) {
			boolean result=this.gameMapper.saveGame(game);
			return result;
		}
}
